#include "./scale_win.h"
#include "./util.h"

void ScaleWin::closeEvent(QCloseEvent *event) {
    if (m_close_anim_flag) {
        QWidget::closeEvent(event);
        return;
    }
    event->ignore();
    m_close_anim_flag = true;
    auto anim = run_scale_anim(this, 150, false);
    connect(anim, &QPropertyAnimation::finished, this, [this]() { close(); });
}
